//
// Created by dxyinme on 2021/10/4.
//

#ifndef VSORT_V_UTIL_H
#define VSORT_V_UTIL_H

namespace Vsort {
template<typename T>
size_t GetLength(VListNode <T> *h);
}

template <typename T>
size_t Vsort::GetLength(Vsort::VListNode<T> *h) {
  size_t length = 0;
  while (h != nullptr) {
    length ++;
    h = h->nxt;
  }
  return length;
}
#endif //VSORT_V_UTIL_H
